package hairmember

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type MemberLevelsRouter struct{}

// InitMemberLevelsRouter 初始化 memberLevels表 路由信息
func (s *MemberLevelsRouter) InitMemberLevelsRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	memberLevelsRouter := Router.Group("hairmember/memberLevels").Use(middleware.OperationRecord())
	memberLevelsRouterWithoutRecord := Router.Group("hairmember/memberLevels")
	memberLevelsRouterWithoutAuth := PublicRouter.Group("hairmember/memberLevels")
	{
		memberLevelsRouter.POST("createMemberLevels", memberLevelsApi.CreateMemberLevels)             // 新建memberLevels表
		memberLevelsRouter.DELETE("deleteMemberLevels", memberLevelsApi.DeleteMemberLevels)           // 删除memberLevels表
		memberLevelsRouter.DELETE("deleteMemberLevelsByIds", memberLevelsApi.DeleteMemberLevelsByIds) // 批量删除memberLevels表
		memberLevelsRouter.PUT("updateMemberLevels", memberLevelsApi.UpdateMemberLevels)              // 更新memberLevels表
	}
	{
		memberLevelsRouterWithoutRecord.GET("findMemberLevels", memberLevelsApi.FindMemberLevels)       // 根据ID获取memberLevels表
		memberLevelsRouterWithoutRecord.GET("getMemberLevelsList", memberLevelsApi.GetMemberLevelsList) // 获取memberLevels表列表
	}
	{
		memberLevelsRouterWithoutAuth.GET("getMemberLevelsPublic", memberLevelsApi.GetMemberLevelsPublic) // memberLevels表开放接口
	}
}
